#include "cpu/exec/template-start.h"

#define instr lgdt

static void do_execute () {
	if (op_src->size == 2)
	{
		cpu.gdtr.seg_limit = swaddr_read (op_src->addr , 2); //SRC[0:15]
		current_sreg = R_DS;
		cpu.gdtr.base_addr = swaddr_read (op_src->addr + 2,3); //SRC[16:47] AND 00FFFFFFH
	}
	else if (op_src->size == 4)
	{
			cpu.gdtr.seg_limit = swaddr_read (op_src->addr , 2); // SRC[0:15]
		cpu.gdtr.base_addr = swaddr_read (op_src->addr + 2,4); //SRC[16:47]
		current_sreg = R_DS;
	}
	print_asm_template1();
}
make_instr_helper(rm)


#include "cpu/exec/template-end.h"